import { Pipe, PipeTransform } from '@angular/core';


@Pipe({
    name:"rep"
})
export class ReplacePipe implements PipeTransform{
    transform(value: String, repStr,toStr,gloabl) {
        // throw new Error("Method not implemented.");
        // console.log("自定义管道",value,args)
        let reg = new RegExp(repStr,gloabl);
        // console.log(reg);
        return value.replace(reg,toStr);
    }

}